Table of Contents
UltraDefrag also includes a new mode that allows you to run it at boot time in a manner similar to chkdsk. This is known as a native application.
If the boot time defragmenter is enabled, you will see such picture at every reboot. Note that you will have a chance to exit safely without a driver loading, just press any key when the appropriate prompt will be shown. If no key will be pressed during this phase, the boot time script will be interpreted and executed.
The only restriction on boot time scans is that you may not scan encrypted volumes. This is because lsass.exe, the component of the operating system that reads encrypted volumes, is loaded after the native executable runs.
The boot time defragmenter can be enabled by boot-on command typed in the command line. To disable them use the boot-off command. There are also the corresponding shortcuts in menu.
To edit the boot time script (contained in %windir%\system32\ud-boot-time.cmd file) type in command prompt boot-config or use the corresponding shortcut in menu.
The script contains defragmentation related commands and comments. To understand better commands used here, read please carefully the console interface section of this document.
The strings with a semicolon (;) or # characters in the beginning are comments.
The boot time script may contain the following commands.
@echo on | Show commands on the screen. This is the default behaviour. |
@echo off | Disable showing commands on the screen. |
set | Set specified environment variable. The usage is the same as described in console application section of this document. |
udefrag | This command has the same options as the console interface. |
pause | Pause the script execution for the specified interval (in milliseconds). P.a. the command pause 1000 will pause execution for one second. |
shutdown | Halt the computer. |
reboot | Reboot the computer. |
exit | Break the boot time program execution. |
Any other commands will be ignored. When the defragger encounters the wrong syntax it shows the appropriate message and continues the script execution.
You can run the boot time defragmenter in interactive mode. Just comment the exit command in script to leave the program to be running after the last command execution.
In interactive mode program shows a prompt like this:
Interactive mode:
Type 'help' for list of supported commands.
#
Currently there are just few simple commands supported in this mode. Of course, in future this mistake will be reclaimed :) To show list of supported commands type help. To continue the Windows Boot Process type exit.
The complete example, installed by default:
;-------------------------------------------------------------------- ; UltraDefrag Boot Time Shell Script ;-------------------------------------------------------------------- ; !!! NOTE: THIS FILE MUST BE SAVED IN UNICODE (UTF-16) ENCODING !!! ;-------------------------------------------------------------------- set UD_IN_FILTER=windows;winnt;ntuser;pagefile;hiberfil set UD_EX_FILTER=temp udefrag c: exit
Note: If there is no exit command specified, the program will run in interactive mode after the last script command execution.
Hack: If you are using Windows 98 operating system but you wish to use the Ultra Defragmenter to optimize your drives from time to time than you have now one cool solution for that. Install Windows XP as a second operating system, install UltraDefrag on them and enable the boot time defragmenter. Insert the reboot command in the boot time script and enjoy! You can simply boot Windows XP, it will defrag anything and automatically reboot the computer at the end.